summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_jpeg.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-09-11 12:52:55 +0300
committerMartin Storsjö <martin@martin.st>2012-09-12 12:09:21 +0300
commit31adff08a14b7cd3f4097a4f912108cd64472069 (patch)
tree19b5cbd97d71ea4c718ed9f84df5f828248fa52e /libavformat/rtpdec_jpeg.c
parentc64d2a63df5d7cd309c184bd0bd33dd2cb1259b1 (diff)
rtpdec_jpeg: Clarify where the subsampling magic numbers come from
Write out the numbers the way they are constructed, not just the final values. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_jpeg.c')
-rw-r--r--libavformat/rtpdec_jpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 4d8523dcb2..20bb356aec 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -166,13 +166,13 @@ static int jpeg_create_header(uint8_t *buf, int size, uint32_t type, uint32_t w,
bytestream2_put_be16(&pbc, w);
bytestream2_put_byte(&pbc, 3);
bytestream2_put_byte(&pbc, 1);
- bytestream2_put_byte(&pbc, type ? 34 : 33);
+ bytestream2_put_byte(&pbc, (2 << 4) | (type ? 2 : 1)); /* hsample/vsample */
bytestream2_put_byte(&pbc, 0);
bytestream2_put_byte(&pbc, 2);
- bytestream2_put_byte(&pbc, 17);
+ bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0);
bytestream2_put_byte(&pbc, 3);
- bytestream2_put_byte(&pbc, 17);
+ bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0);
/* SOS */